package com.apes.scm.pur.purchaseOrder.repository;


import com.apes.framework.jpa.repository.CustomRepository;
import com.apes.scm.pur.purchaseOrder.model.PurchaseOrderItem;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author xul
 * @create 2018-01-23 16:07
 */
public interface PurchaseOrderItemRepository extends CustomRepository<PurchaseOrderItem, Long> {
    @Query(value = "SELECT T FROM PurchaseOrderItem T WHERE purchaseOrder.id = ?1 order by product.classify.id, product.brand.id asc ")
    List<PurchaseOrderItem> findTransferId(String purchaseId);
}
